export const constantRoute = [
  {
    path: '/',
    component: () => import('@/views/layout.vue'),
    name: 'layout',
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home.vue'),
        name: 'home',
      },
    ],
  },
  {
    path: '/:pathMatch(.*)*',
    component: () => import('@/views/403.vue'),
  },
]

export const asyncRoute = [
  {
    path: '/order',
    component: () => import('@/views/order.vue'),
    name: 'order',
    meta: { roles: ['borrower', 'brand', 'customer'], requiresAuth: true, parentName: 'layout' },
  },
  {
    path: '/profile',
    component: () => import('@/views/profile.vue'),
    name: 'profile',
    meta: { roles: ['borrower', 'brand', 'customer'], requiresAuth: true, parentName: 'layout' },
  },
  {
    path: '/borSupply',
    component: () => import('@/views/borSupply.vue'),
    name: 'borSupply',
    meta: { roles: ['borrower'], requiresAuth: true, parentName: 'layout' },
  },
  {
    path: '/braStore',
    component: () => import('@/views/braStore.vue'),
    name: 'braStore',
    meta: { roles: ['brand'], requiresAuth: true, parentName: 'layout' },
  },
  {
    path: '/admin',
    component: () => import('@/views/admin.vue'),
    name: 'admin',
    meta: { roles: ['admin'], requiresAuth: true },
  },
]
